package com.edu.service.impl;


import java.util.List;

import com.edu.dao.impl.UserDaoImpl;
import com.edu.entity.Users;
import com.edu.service.IUsersService;
import com.sun.org.apache.bcel.internal.generic.DALOAD;
import com.edu.util.PageData;


/**
 * 
 * @author 陆海
 *
 */
public class UsersServiceImpl implements IUsersService {

	UserDaoImpl service=new UserDaoImpl();

	/**1
	 * 用户登录
	 */
	@Override
	public Users userlogin(String userAccount, String userPwd) {
		// TODO Auto-generated method stub
		return service.userLogin(userAccount, userPwd);
	}
	
	/**
	 * 用户注册
	 */
	@Override
	public boolean userregister(Users users) {
		// TODO Auto-generated method stub
		return service.userRegister(users);
	}

	/**
	 * 用户名查重
	 */
	@Override
	public boolean getUserAccount(String userAccount) {
		// TODO Auto-generated method stub
		return service.checkName(userAccount);
	}
    
	/**
	 * users表个userinfos表全字段查询
	 */
	@Override
	public List<Users> getAllUsers() {
		return service.queryAllUsers();
	}

	/**
	 * 
	 * @author gyx
	 *
	 */
	@Override
	public List<Users> getAllUser() {
		// TODO Auto-generated method stub
		return service.queryAllUsers();
	}

	@Override
	public List<Users> getUserByAccount(String userAccount) {
		// TODO Auto-generated method stub
		return service.queryUserByAccount(userAccount);
	}

	@Override
	public int getCountNewUsers() {
		// TODO Auto-generated method stub
		return service.countNewUsers();
	}

	@Override
	public int getCountYesterdayUsers() {
		// TODO Auto-generated method stub
		return service.countYesterdayUsers();
	}

	@Override
	public List<Users> getTopUser() {
		// TODO Auto-generated method stub
		return service.queryNewUser();
	}

	@Override
	public boolean logoutUser(int userId) {
		// TODO Auto-generated method stub
		return service.logoutUser(userId);
	}

	@Override
	public boolean startUser(int userId) {
		// TODO Auto-generated method stub
		return service.startUser(userId);
	}

	@Override
	public boolean addUserScore(int userId) {
		// TODO Auto-generated method stub
		return service.addUserScore(userId);
	}

	@Override
	public int getNewUser() {
		// TODO Auto-generated method stub
		return service.queryNewUserCount();
	}
	
	@Override
	public int getUsersCount() {
		// TODO Auto-generated method stub
		return service.queryUsersCount();
	}
	
	@Override
	public PageData getUserByLikePage(int pageNo, int pageSize, String accountkey) {
		// TODO Auto-generated method stub
		return service.queryUserByLikePage(pageNo, pageSize, accountkey);
	}

	@Override
	public int[] get7DayAtricles() {
		// TODO Auto-generated method stub
		return service.query7DayUsers();
	}
	
}
